﻿using System;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Collections.ObjectModel;
using Resn.WhuPub.BLL;

namespace Resn.WhuPub.WPFClientUI
{
        /// <summary>
        /// SystemPage.xaml 的交互逻辑
        /// </summary>
        public partial class DepartmentInfoPage : Page
        {
                private readonly GlobalManager _gm = GlobalManager.Instance;

                public DepartmentInfoPage()
                {
                        InitializeComponent();
                }

                private void Page_Loaded(object sender, RoutedEventArgs e)
                {
                        LayoutRoot.DataContext = _gm;
                }

                

                private void MajorSetupButton_Click(object sender, RoutedEventArgs e)
                {
                        _gm.MajorSetups = new ObservableCollection<MajorSetup>(_gm.Department.MajorSetups);
                        NavigationService.Navigate(new Uri("ManageMajorSetupsPage.xaml", UriKind.Relative));
                }

                private void MajorOperationButton_Click(object sender, RoutedEventArgs e)
                {
                        NavigationService.Navigate(new Uri("ManageMajorOperationsPage.xaml", UriKind.Relative));
                }


                private void CourseButton_Click(object sender, RoutedEventArgs e)
                {
                        NavigationService.Navigate(new Uri("ManageCoursesPage.xaml", UriKind.Relative));
                }

                private void ContactButton_Click(object sender, RoutedEventArgs e)
                {
                        NavigationService.Navigate(new Uri("ManageContactsPage.xaml", UriKind.Relative));
                }
        }
}